<!--
 * @Description: 代理购票
 * @Version: 2.0
 * @Autor: 许国辉
 * @Date: 2022-12-13 13:00:56
 * @LastEditors: 许国辉
 * @LastEditTime: 2023-10-21 20:13:30
-->
<template>
  <div>等待进入...</div>
  <div v-if="htmlStr">
    <span v-dompurify-html="htmlStr"></span>
  </div>
</template>
<script setup lang="ts">
  import { onMounted, ref } from 'vue';
  import { useRouter } from 'vue-router';
  import { useTabs } from '/@/hooks/web/useTabs';
  const { close } = useTabs();
  const { currentRoute } = useRouter();
  const isOpen = ref(false);
  const htmlStr = ref('');
  const goLoginTicket = async () => {
    isOpen.value = true;
    // htmlStr.value = data;
    window.open('https://management.baiyunair.com/');
    setTimeout(async () => {
      close(currentRoute.value);
      // tabStore.refreshPage(router);
    }, 100);
  };
  onMounted(() => {
    setTimeout(() => {
      goLoginTicket();
    }, 30);
  });
</script>
